package cn.zzuli.springcloud.controller;

import cn.zzuli.springcloud.domain.CommonResult;
import cn.zzuli.springcloud.domain.Order;
import cn.zzuli.springcloud.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Date: 2020/12/26 19:01
 * @Author: 绯色下午茶
 * @Description:
 */
@RestController
@RequestMapping("/order")
@Slf4j
public class OrderController {
    @Resource
    OrderService orderService;

    @GetMapping("/create")
    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}
